# $OpenBSD$

COMMENT =	screen color picker for graphic, web and print designers

GH_ACCOUNT =	nielssp
GH_PROJECT =	colorgrab
GH_TAGNAME =	v0.3

CATEGORIES =	graphics

MAINTAINER =	Adnan Shameem <adnan360@protonmail.com>

# MIT Expat
PERMIT_PACKAGE =	Yes

WANTLIB += ${COMPILER_LIBCXX} c m wx_baseu-3.0 wx_baseu_xml-3.0
WANTLIB += wx_gtk3u_adv-3.0 wx_gtk3u_core-3.0 wx_gtk3u_xrc-3.0

LIB_DEPENDS =	x11/wxWidgets

NO_TEST =	Yes

MODULES =	devel/cmake

do-install:
	${INSTALL_PROGRAM} ${WRKBUILD}/colorgrab ${PREFIX}/bin

	${INSTALL_DATA_DIR} ${PREFIX}/share/applications/
	${INSTALL_DATA} ${WRKSRC}/pkg/arch/colorgrab.desktop \
		${PREFIX}/share/applications/colorgrab.desktop

	${INSTALL_DATA_DIR} ${PREFIX}/share/icons/hicolor/scalable/apps
	${INSTALL_DATA} ${WRKSRC}/img/scalable.svg \
		${PREFIX}/share/icons/hicolor/scalable/apps/colorgrab.svg
.for s in 16x16 32x32 48x48 64x64 128x128 256x256
	${INSTALL_DATA_DIR} ${PREFIX}/share/icons/hicolor/$s/apps
	${INSTALL_DATA} ${WRKSRC}/img/$s.png \
		${PREFIX}/share/icons/hicolor/$s/apps/colorgrab.png
.endfor

	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/colorgrab
	${INSTALL_DATA} ${WRKSRC}/LICENSE   ${PREFIX}/share/doc/colorgrab/LICENSE
	${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/doc/colorgrab/README.md

.include <bsd.port.mk>
